home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_m_p / pwez51.zip / TIPS.DOC < prev    next >
Text File  |  1992-04-01  |  6KB  |  146 lines

  1.  
  2.  
  3.  
  4.                              TIPS AND SUGGESTIONS
  5.  
  6.          NOTE: Argument designations are those used in the
  7.          documentation - WIND_REZ.DOC.
  8.  
  9.  
  10.          1. Pulldown and scroll windows require a dummy array to hold
  11.             the info-line data when the info-line is not used.  All
  12.             modules and calls to SCRLWIND and PULLDOWN may use the
  13.             same dummy array.
  14.  
  15.             Place this in the main module:
  16.  
  17.             COMMON SHARED /DUMMYDATA/ DUMMY$()
  18.             DIM DUMMY$(0)
  19.  
  20.             Place this in any other module using routines PULLDOWN or
  21.             SCRLWIND not using the info-line.
  22.  
  23.             COMMON SHARED /DUMMYDATA/ DUMMY$()
  24.  
  25.             Use DUMMY$() to represent the info-line ( when it is not
  26.             used ) in calls to SCRLWIND and PULLDOWN.
  27.  
  28.  
  29.          2. QuickBASIC 4+ can be very unpredictable when using ON
  30.             ERROR GO TO ..  in a sub program or function unless the
  31.             sub program or routine is STATIC.
  32.  
  33.             The following is OK.
  34.  
  35.             SUB TEST ( A%, B% ) STATIC
  36.  
  37.               ON ERROR GOTO LABEL     ' LABEL MUST BE AT MODULE LEVEL
  38.  
  39.             END SUB
  40.  
  41.             The following can cause a STRING SPACE CORRUPT error, a
  42.             crash, or the program may bind.  It may work fine in the
  43.             QB environment, but may cause problems in the executable
  44.             program.
  45.  
  46.             SUB TEST ( A%, B% )       ' No STATIC
  47.  
  48.               ON ERROR GOTO LABEL     ' LABEL MUST BE AT MODULE LEVEL
  49.  
  50.             END SUB
  51.  
  52.             If the ON ERROR and LABEL are both in the main module the
  53.             problem does not occur.
  54.  
  55.  
  56.          3. It is important to know if an active PULLDOWN or INPUT
  57.             window exits.  If either unknowingly exists the following
  58.             will occur on entry to the routines.
  59.  
  60.             - Routine INPTWIND will place a field without a window in
  61.               the location it would occupy based on the coordinates of
  62.               the active input window.  The coordinates in the call to
  63.               INPTWIND are ignored.
  64.  
  65.             - Routine PULLDOWN is re-entered in the active pulldown
  66.               window at same location it was at when it was exited. If
  67.               the active input window is not intact it is not re-
  68.               displayed.  The entries in the active pulldown window
  69.               are re-printed without the window.
  70.  
  71.  
  72.          4. Routine MULTINPT is ALWAYS exited when the cursor leaves a
  73.             "FIXED CHOICE" field.  Use argument RKEY% to determine if
  74.             the SPACE BAR exited MULTINPT.  Remember, even if the
  75.             SPACE BAR is not pressed a FIXED CHOICE field will be
  76.             exited any time the cursor leaves it, or an exit key is
  77.             pressed.
  78.  
  79.             If field 5 ( AUTOEXIT% = 5 on exit ) is a FIXED CHOICE
  80.             field, on exit from routine MULTINPT the following will
  81.             determine why field 5 caused the exit.
  82.  
  83.             'RKEY% represents the exit key.
  84.  
  85.             IF AUTOEXIT% = 5 THEN        ' Exit was on field 5.
  86.  
  87.                 IF RKEY% = 32 THEN ...
  88.  
  89.                     ' SPACE BAR caused the exit
  90.  
  91.                 ELSE
  92.  
  93.                     ' Cursor leaving field 5 or an exit key ( F1, F2,
  94.                     ' etc. ) caused the exit.  If exit was not by the
  95.                     ' SPACE BAR the program will ALWAYS proceed here
  96.                     ' as a FIXED CHOICE field is ALWAYS an auto-exit
  97.                     ' field and MULTINPT is ALWAYS exited.  It may be
  98.                     ' appropriate to do nothing and simply re-enter
  99.                     ' MULTINPT in this case.
  100.  
  101.                 END IF
  102.  
  103.             END IF
  104.  
  105.  
  106.          5. If several small windows are placed entirely within a
  107.             larger window it may not be necessary to restore the
  108.             display area under each window.  If the display area under
  109.             the larger window is to be restored it may only be
  110.             necessary to delete the smaller windows via routine
  111.             DELWIND and restore the display area under the larger
  112.             window with routine RSTRWIND.  This is faster and more
  113.             memory efficient than restoring all of the windows.
  114.  
  115.          6.  If partial windows remain on the screen the most likely
  116.              cause is windows were restored out of order.  The top
  117.              window must be restored first if it is not entirely
  118.              inside the bottom window.
  119.  
  120.  
  121.          7.  If a title for a virtual scroll window is defined in the
  122.              call to MAKEWIND for the scroll window, the title will
  123.              not scroll left and right.  The title for virtual scroll
  124.              windows must be set by the argument for the top line in
  125.              routine SCRLWIND. ( TL$ )
  126.  
  127.          8.  The argument for the key character color in virtual
  128.              scroll windows must equal zero or an error 24 will be
  129.              reported.  ( STRING WON'T FIT )
  130.  
  131.          9.  If all fields in a call to MULTINPT are not updated on
  132.              entry the cause is argument AUTOEXIT% does not equal
  133.              zero.  AUTOEXIT% sets single field update if not zero.
  134.  
  135.          10. It may appear the input routines are not working if the
  136.              text is the same color as the fields.
  137.  
  138.          11. Functions MUST be declared in all modules using them.
  139.  
  140.          12. If routine B4SCRL is used to set up a call to SCRLWIND
  141.              use it immediately before the call to SCRLWIND.  Do not
  142.              allow anything to change the program flow between the
  143.              calls to B4SCRL and SCRLWIND.  Doing so may result in a
  144.              different scroll window assuming the options specified by
  145.              the call to B4SCRL.
  146.